from django.contrib import admin

# Register your models here.
import xadmin
# CollegeModel, ProfessionalModel, GradeModel, ClassModel, CourseModel, ChapterModel
from .models import UserModel, CollegeModel, ProfessionalModel, GradeModel, ClassModel, CourseModel, ChapterModel, \
    TeacherModel


class UserModelAdmin():
    list_display = ["name", "number", "password", "phone", "role", "college", "college_number", "professional",
                    "professional_number", "grade", "grade_number", "class_id", "class_number"]


xadmin.site.register(UserModel, UserModelAdmin)


class CollegeModelAdmin():
    list_display = ["college", "number"]


xadmin.site.register(CollegeModel, CollegeModelAdmin)


class ProfessionalModelAdmin():
    list_display = ["professional", "number", "college"]


xadmin.site.register(ProfessionalModel, ProfessionalModelAdmin)


class GradeModelAdmin():
    list_display = ["grade", "number", "professional"]


xadmin.site.register(GradeModel, GradeModelAdmin)


class ClassModelAdmin():
    list_display = ["class_id", "number", "grade"]


xadmin.site.register(ClassModel, ClassModelAdmin)


class CourseModelAdmin():
    list_display = ["name", "number", "teacher"]


xadmin.site.register(CourseModel, CourseModelAdmin)


class ChapterModelAdmin():
    list_display = ["course", "name", "number", "content"]
    style_fields = {"content": "ueditor"}


xadmin.site.register(ChapterModel, ChapterModelAdmin)


class TeacherModelAdmin():
    list_display = ["name", "phone", "number", "role"]


xadmin.site.register(TeacherModel, TeacherModelAdmin)





import xadmin
# CollegeModel, ProfessionalModel, GradeModel, ClassModel, CourseModel, ChapterModel
from .models import ExamTaoModel, ChooseModel, JudgeModel, ReadingModel, StudentResultsModel


class ExamTaoModelAdmin():
    list_display = ["tao_name", "course"]


xadmin.site.register(ExamTaoModel, ExamTaoModelAdmin)


class ChooseModelAdmin():
    list_display = ["title", "options_a", "options_b", "options_c", "options_d", "answer", "exam", "course"]


xadmin.site.register(ChooseModel, ChooseModelAdmin)


# class MoreChooseModelAdmin():
#     list_display = ["title", "more_options_A", "more_options_B", "more_options_C", "more_options_D", "more_answer", "exam", "course"]
#
#
# xadmin.site.register(MoreChooseModel, MoreChooseModelAdmin)


class JudgeModelAdmin():
    list_display = ["judge_title", "judge_options_Y", "judge_options_N", "judge_answer", "exam", "course"]


xadmin.site.register(JudgeModel, JudgeModelAdmin)


class ReadingModelAdmin():
    list_display = ["reading_title", "reading_answer", "exam", "course"]


xadmin.site.register(ReadingModel, ReadingModelAdmin)


class StudentResultsModelAdmin():
    list_display = ["student", "exam", "course", "choose", "more_choose", "judge", "read", "exam", "course"]


xadmin.site.register(StudentResultsModel, StudentResultsModelAdmin)
